package com.qiaoba.module.system.entity.dto;

import com.qiaoba.common.base.validate.AddGroup;
import com.qiaoba.common.base.validate.EditGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 参数配置 DTO
 *
 * @author ailanyin
 * @date 2023-09-09 16:30:10
 */
@Data
public class SysConfigDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "参数ID")
    @NotNull(message = "参数ID不能为空", groups = {EditGroup.class})
    @Size(max = 20, message = "参数ID不能超过{max}个字符", groups = {EditGroup.class})
    private String configId;

    @Schema(description = "参数名称")
    @NotNull(message = "参数名称不能为空", groups = {AddGroup.class, EditGroup.class})
    @Size(max = 50, message = "参数名称不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String configName;

    @Schema(description = "参数键名")
    @NotNull(message = "参数键名不能为空", groups = {AddGroup.class, EditGroup.class})
    @Size(max = 50, message = "参数键名不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String configKey;

    @Schema(description = "参数键值")
    @NotNull(message = "参数键值不能为空", groups = {AddGroup.class, EditGroup.class})
    @Size(max = 50, message = "参数键值不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String configValue;

    @Schema(description = "是否系统内置（Y是 N否）")
    @NotNull(message = "参数键值不能为空", groups = {AddGroup.class, EditGroup.class})
    @Size(max = 1, message = "是否系统内置不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String configType;

    @Schema(description = "备注")
    @Size(max = 500, message = "备注不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String remark;
}
